<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.9.2" />
<title>lupro API documentation</title>
<meta name="description" content="Lupro Library
~~~~~~~~~~~~~~~~~~~~~ …" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/typography.min.css" integrity="sha256-7l/o7C8jubJiy74VsKTidCy1yBkRtiUGbVkYBylBqUg=" crossorigin>
<link rel="stylesheet preload" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/styles/github.min.css" crossorigin>
<style>:root{--highlight-color:#fe9}.flex{display:flex !important}body{line-height:1.5em}#content{padding:20px}#sidebar{padding:30px;overflow:hidden}#sidebar > *:last-child{margin-bottom:2cm}.http-server-breadcrumbs{font-size:130%;margin:0 0 15px 0}#footer{font-size:.75em;padding:5px 30px;border-top:1px solid #ddd;text-align:right}#footer p{margin:0 0 0 1em;display:inline-block}#footer p:last-child{margin-right:30px}h1,h2,h3,h4,h5{font-weight:300}h1{font-size:2.5em;line-height:1.1em}h2{font-size:1.75em;margin:1em 0 .50em 0}h3{font-size:1.4em;margin:25px 0 10px 0}h4{margin:0;font-size:105%}h1:target,h2:target,h3:target,h4:target,h5:target,h6:target{background:var(--highlight-color);padding:.2em 0}a{color:#058;text-decoration:none;transition:color .3s ease-in-out}a:hover{color:#e82}.title code{font-weight:bold}h2[id^="header-"]{margin-top:2em}.ident{color:#900}pre code{background:#f8f8f8;font-size:.8em;line-height:1.4em}code{background:#f2f2f1;padding:1px 4px;overflow-wrap:break-word}h1 code{background:transparent}pre{background:#f8f8f8;border:0;border-top:1px solid #ccc;border-bottom:1px solid #ccc;margin:1em 0;padding:1ex}#http-server-module-list{display:flex;flex-flow:column}#http-server-module-list div{display:flex}#http-server-module-list dt{min-width:10%}#http-server-module-list p{margin-top:0}.toc ul,#index{list-style-type:none;margin:0;padding:0}#index code{background:transparent}#index h3{border-bottom:1px solid #ddd}#index ul{padding:0}#index h4{margin-top:.6em;font-weight:bold}@media (min-width:200ex){#index .two-column{column-count:2}}@media (min-width:300ex){#index .two-column{column-count:3}}dl{margin-bottom:2em}dl dl:last-child{margin-bottom:4em}dd{margin:0 0 1em 3em}#header-classes + dl > dd{margin-bottom:3em}dd dd{margin-left:2em}dd p{margin:10px 0}.name{background:#eee;font-weight:bold;font-size:.85em;padding:5px 10px;display:inline-block;min-width:40%}.name:hover{background:#e0e0e0}dt:target .name{background:var(--highlight-color)}.name > span:first-child{white-space:nowrap}.name.class > span:nth-child(2){margin-left:.4em}.inherited{color:#999;border-left:5px solid #eee;padding-left:1em}.inheritance em{font-style:normal;font-weight:bold}.desc h2{font-weight:400;font-size:1.25em}.desc h3{font-size:1em}.desc dt code{background:inherit}.source summary,.git-link-div{color:#666;text-align:right;font-weight:400;font-size:.8em;text-transform:uppercase}.source summary > *{white-space:nowrap;cursor:pointer}.git-link{color:inherit;margin-left:1em}.source pre{max-height:500px;overflow:auto;margin:0}.source pre code{font-size:12px;overflow:visible}.hlist{list-style:none}.hlist li{display:inline}.hlist li:after{content:',\2002'}.hlist li:last-child:after{content:none}.hlist .hlist{display:inline;padding-left:1em}img{max-width:100%}td{padding:0 .5em}.admonition{padding:.1em .5em;margin-bottom:1em}.admonition-title{font-weight:bold}.admonition.note,.admonition.info,.admonition.important{background:#aef}.admonition.todo,.admonition.versionadded,.admonition.tip,.admonition.hint{background:#dfd}.admonition.warning,.admonition.versionchanged,.admonition.deprecated{background:#fd4}.admonition.error,.admonition.danger,.admonition.caution{background:lightpink}</style>
<style media="screen and (min-width: 700px)">@media screen and (min-width:700px){#sidebar{width:30%;height:100vh;overflow:auto;position:sticky;top:0}#content{width:70%;max-width:100ch;padding:3em 4em;border-left:1px solid #ddd}pre code{font-size:1em}.item .name{font-size:1em}main{display:flex;flex-direction:row-reverse;justify-content:flex-end}.toc ul ul,#index ul{padding-left:1.5em}.toc > ul > li{margin-top:.5em}}</style>
<style media="print">@media print{#sidebar h1{page-break-before:always}.source{display:none}}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}a[href]:after{content:" (" attr(href) ")";font-size:90%}a[href][title]:after{content:none}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h1,h2,h3,h4,h5,h6{page-break-after:avoid}}</style>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/highlight.min.js" integrity="sha256-Uv3H6lx7dJmRfRvH8TH6kJD1TSK1aFcwgx+mdg3epi8=" crossorigin></script>
<script>window.addEventListener('DOMContentLoaded', () => hljs.initHighlighting())</script>
</head>
<body>
<main>
<article id="content">
<header>
<h1 class="title">Package <code>lupro</code></h1>
</header>
<section id="section-intro">
<p>Lupro Library
~~~~~~~~~~~~~~~~~~~~~</p>
<p>Lupro is an Asynchronous HTTP library, written in Python, It is fully compatible with <code>requests</code>.
usage:</p>
<ul>
<li><code>兼容requests</code></li>
</ul>
<blockquote>
<blockquote>
<blockquote>
<p>from lupro import lupro
r = lupro.get('https://www.python.org')
r.status_code
200</p>
</blockquote>
</blockquote>
</blockquote>
<p>其它 <code>lupro.api</code> 请参考 <a href="https://github.com/luxuncang/lupro">https://github.com/luxuncang/lupro</a>.</p>
<p>:copyright: (c) 2021 by ShengXin Lu.</p>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">&#39;&#39;&#39;
Lupro Library
~~~~~~~~~~~~~~~~~~~~~

Lupro is an Asynchronous HTTP library, written in Python, It is fully compatible with `requests`.
usage:

* `兼容requests`

   &gt;&gt;&gt; from lupro import lupro
   &gt;&gt;&gt; r = lupro.get(&#39;https://www.python.org&#39;)
   &gt;&gt;&gt; r.status_code
   200

其它 `lupro.api` 请参考 &lt;https://github.com/luxuncang/lupro&gt;.

:copyright: (c) 2021 by ShengXin Lu.
&#39;&#39;&#39;

from typing import Any
from gevent import monkey
monkey.patch_all()  # 先引用
import gevent
import requests
import os
import sys
import random
import re
from datetime import datetime
from lxml import etree
from dtanys import XDict
from copy import copy

__author__ = &#39;ShengXin Lu&#39;
__version__ = &#39;1.0.4&#39;

# UA池
ua_list = [ 
     &#34;Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 OPR/26.0.1656.60&#34;,
     &#34;Opera/8.0 (Windows NT 5.1; U; en)&#34;,
     &#34;Mozilla/5.0 (Windows NT 5.1; U; en; rv:1.8.1) Gecko/20061208 Firefox/2.0.0 Opera 9.50&#34;,
     &#34;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 9.50&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0&#34;,
     &#34;Mozilla/5.0 (X11; U; Linux x86_64; zh-CN; rv:1.9.2.10) Gecko/20100922 Ubuntu/10.10 (maverick) Firefox/3.6.10&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2 &#34;,
     &#34;Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36&#34;,
     &#34;Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11&#34;,
     &#34;Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.11 TaoBrowser/2.0 Safari/536.11&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.71 Safari/537.1 LBBROWSER&#34;,
     &#34;Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; LBBROWSER)&#34;,
     &#34;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; QQDownload 732; .NET4.0C; .NET4.0E; LBBROWSER)&#34;,
     &#34;Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; QQBrowser/7.0.3698.400)&#34;,
     &#34;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; QQDownload 732; .NET4.0C; .NET4.0E)&#34;,
     &#34;Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.84 Safari/535.11 SE 2.X MetaSr 1.0&#34;,
     &#34;Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; SV1; QQDownload 732; .NET4.0C; .NET4.0E; SE 2.X MetaSr 1.0)&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 &#34;,
     &#34;(KHTML, like Gecko) Chrome/22.0.1207.1 Safari/537.1&#34;,
     &#34;Mozilla/5.0 (X11; CrOS i686 2268.111.0) AppleWebKit/536.11 &#34;
     &#34;(KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.6 &#34;
     &#34;(KHTML, like Gecko) Chrome/20.0.1092.0 Safari/536.6&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.6 &#34;
     &#34;(KHTML, like Gecko) Chrome/20.0.1090.0 Safari/536.6&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.1 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.77.34.5 Safari/537.1&#34;,
     &#34;Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.0.1084.9 Safari/536.5&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.0) AppleWebKit/536.5 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.0.1084.36 Safari/536.5&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.3 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.0.1063.0 Safari/536.3&#34;,
     &#34;Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.3 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.0.1063.0 Safari/536.3&#34;,
     &#34;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/536.3 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.0.1063.0 Safari/536.3&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.3 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.0.1062.0 Safari/536.3&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.3 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.0.1062.0 Safari/536.3&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.3 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.0.1061.1 Safari/536.3&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.3 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.0.1061.1 Safari/536.3&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.3 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.0.1061.1 Safari/536.3&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.3 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.0.1061.0 Safari/536.3&#34;,
     &#34;Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.24 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.0.1055.1 Safari/535.24&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/535.24 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.0.1055.1 Safari/535.24&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 &#34;
     &#34;(KHTML, like Gecko) Chrome/22.0.1207.1 Safari/537.1&#34;,
     &#34;Mozilla/5.0 (X11; CrOS i686 2268.111.0) AppleWebKit/536.11 &#34;
     &#34;(KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.6 &#34;
     &#34;(KHTML, like Gecko) Chrome/20.0.1092.0 Safari/536.6&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.6 &#34;
     &#34;(KHTML, like Gecko) Chrome/20.0.1090.0 Safari/536.6&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.1 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.77.34.5 Safari/537.1&#34;,
     &#34;Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.0.1084.9 Safari/536.5&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.0) AppleWebKit/536.5 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.0.1084.36 Safari/536.5&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.3 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.0.1063.0 Safari/536.3&#34;,
     &#34;Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.3 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.0.1063.0 Safari/536.3&#34;,
     &#34;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/536.3 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.0.1063.0 Safari/536.3&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.3 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.0.1062.0 Safari/536.3&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.3 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.0.1062.0 Safari/536.3&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.3 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.0.1061.1 Safari/536.3&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.3 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.0.1061.1 Safari/536.3&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.3 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.0.1061.1 Safari/536.3&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.3 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.0.1061.0 Safari/536.3&#34;,
     &#34;Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.24 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.0.1055.1 Safari/535.24&#34;,
     &#34;Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/535.24 &#34;
     &#34;(KHTML, like Gecko) Chrome/19.0.1055.1 Safari/535.24&#34;
]

# 自定义请求头
def get_header() -&gt; str:
    &#39;&#39;&#39;`get_header` 生成一个UA头.

    Args:
        None : 无参数

    Returns:
        str : 返回一个UA头字符串即可
    &#39;&#39;&#39;
    return random.choice(ua_list)

# 自定义代理池
def get_proxies():
    &#39;&#39;&#39;获取代理,并将代理赋值到 `lupro.Proxies`.

    Args:
        None : 无参数

    Returns:
        bool : 返回Ture
    &#39;&#39;&#39;
    raise NameError(&#39;Please rewrite `get_proxies` function.&#39;)

# 自定义代理验证
def verify_proxies(proxies : str) -&gt; str:
    &#39;&#39;&#39; 自定义代理验证 `verify_proxies` 可以重写,如果可用返回 `proxies` 否则返回 `False`.

    Args:
        `proxies` : str 代理
    
    Returns:
        str | bool : 如果可用返回 `proxies` 否则返回 `False`
    &#39;&#39;&#39;
    try:
        requests.get(url=&#39;http://www.baidu.com/&#39;, headers={&#34;User-Agent&#34;: get_header()},proxies={&#39;http&#39;: f&#34;//{proxies}&#34;},timeout=10)
    except:
        return False
    return proxies

# 自定义日志打印
def logging(text) -&gt; str:
    &#39;&#39;&#39;自定义日志打印  `logging` 可以重写,返回带 `text` 的字符串即可.

    Args:
        `text` : str 日志
    
    Returns:
        str : 返回处理后的打印日志
    &#39;&#39;&#39;
    return &#34;%s INFO %s&#34;  % (datetime.now(), text)

# 辅助函数
def original(f) -&gt; Any:
    &#39;&#39;&#39;  默认解析处理函数.

    Args:
        `f` : function 自定义解析处理函数
    
    Retuens:
        function : 自定义解析处理函数
    &#39;&#39;&#39;
    return f

# 泛属性元类
class inherit(type):
    &#39;&#39;&#39;类泛属性&#39;&#39;&#39;

    def __getattr__(cls, name):
        if not &#39;__general__&#39; in dir(cls):
            raise NameError(&#34;name &#39;__general__&#39; is not defined&#34;)
        if hasattr(cls.__general__, name):
            return getattr(cls.__general__, name)
        return getattr(object.__getattr__, name)

# `requests` 字典
class lupros():
    &#39;&#39;&#39;`requests` 辅助字典生成器&#39;&#39;&#39;

    @classmethod
    def request(self, *args, **kw):
        return (args, kw)

    @classmethod
    def get(self, *args, **kw):
        return (&#39;get&#39;, args, kw)

    @classmethod
    def post(self, *args, **kw):
        return (&#39;post&#39;, args, kw)

    @classmethod
    def options(self, *args, **kw):
        return (&#39;options&#39;, args, kw)

    @classmethod
    def head(self, *args, **kw):
        self.args = (&#39;get&#39;, *args)
        self.kw = kw
        return (&#39;head&#39;, args, kw)

    @classmethod
    def put(self, *args, **kw):
        return (&#39;put&#39;, args, kw)

    @classmethod
    def patch(self, *args, **kw):
        return (&#39;patch&#39;, args, kw)

    @classmethod
    def delete(self, *args, **kw):
        return (&#39;delete&#39;, args, kw)
    
# `lupro` 引擎基类
class lupro(metaclass=inherit):
    &#39;&#39;&#39;`lupro` 引擎基类&#39;&#39;&#39;

    # 兼容 `requests`
    __general__ = requests

    # 当前文件夹
    onFile = os.path.split(sys.argv[0])[0]

    # 代理池
    Proxies = []

    # 是否验证代理池
    VERIFY_PROXIES = False

    # 是否已验证代理
    IS_AGENT_VERIFIED = False

    def __init__(self, filename : str, lupros : lupros, proxie : bool = False, format : str = &#39;html&#39;, content : int = 200,faultolt : int = 10):
        &#39;&#39;&#39; 初始化 `lupro` 实例，一个实例代表一个请求或任务.

        Args:
            `filename` : `str` 文件路径或请求名称 推荐使用路径命名
            `lupros` : `lupros` requests参数字典
            `proxie` : `bool` 是否使用代理
            `format` : `str` 保存文件格式
            `content` : `str` 回调最少字节
            `faultolt` : `str` 可重试次数
        
        Returns:
            None
        &#39;&#39;&#39;
        self.filename = filename    # 文件路径或请求名称 推荐使用路径命名
        self.format = format        # 保存文件格式
        self.faultolt = faultolt    # 可重试次数
        self.proxie = proxie        # 是否使用代理
        self.content = content      # 回调最少字节
        self.lupros = lupros
        self.args = (lupros[0],*lupros[1])
        self.kw = copy(lupros[2])

        if (not lupro.Proxies) and proxie:
            get_proxies()

        assert (not self.proxie) or (self.proxie and lupro.Proxies),&#39;`Proxies` cannot be empty!&#39;

        if not &#39;headers&#39; in self.kw:
            self.kw[&#39;headers&#39;] = {&#39;User-Agent&#39; : get_header()}
        
        if lupro.VERIFY_PROXIES and self.proxie and (not lupro.IS_AGENT_VERIFIED):
            print(logging(&#39;开始验证代理！&#39;))
            t1 = datetime.now()
            self.authentication()
            lupro.IS_AGENT_VERIFIED = True
            print(logging(f&#39;用时{datetime.now()-t1}&#39;))
            print(logging(f&#34;高质量代理：{len(lupro.Proxies)}个！&#34;))
        if (not &#39;proxies&#39; in self.kw) and self.proxie:
            self.proxie = random.choice(lupro.Proxies)
            self.kw[&#39;proxies&#39;] = {&#39;http&#39;: f&#34;//{self.proxie}&#34;}
    
    # 验证代理
    def authentication(self) -&gt; None:
        &#39;&#39;&#39;`authentication` 为快速代理验证.&#39;&#39;&#39;

        auth_proxies = [gevent.spawn(verify_proxies,i) for i in lupro.Proxies]
        gevent.joinall(auth_proxies)
        lupro.Proxies = [i.value for i in auth_proxies if i.value]

    # 请求方法 lupro 所有请求
    def task(self) -&gt; requests:
        &#39;&#39;&#39;`task` 为 `lupro` 实例所有请求接口&#39;&#39;&#39;

        if self.faultolt&lt;=0:
            print(f&#39;{self.filename} failed.&#39;)
            return False
        print(logging(f&#34;{self.filename} {self.proxie} -----&gt;开始请求！&#34;))
        try:
            res = requests.request(*self.args, **self.kw)
        except:
            if self.proxie in lupro.Proxies:
                lupro.Proxies.remove(self.proxie)
            self.faultolt-=1
            self.proxie = random.choice(lupro.Proxies)
            self.kw[&#39;proxies&#39;] = {&#39;http&#39;: f&#34;//{self.proxie}&#34;}
            print(logging(f&#34;{self.filename}-----&gt;更新字典中！&#34;))
            return self.task()
        if not res.status_code==200:
            return self.task()
        if len(res.content)&lt;self.content:
            return self.task()
        print(logging(f&#34;{self.filename} {len(res.content)} -----&gt;请求结束！&#34;))
        return res
    
    # xpath 解析
    def xpath_analysis(self, analytic : dict, auxiliary = original) -&gt; dict:
        &#39;&#39;&#39;实例 xpath 解析方法.

        Args:
            `analytic` : `dict[str:str]` xpath解析字典
            `auxiliary` : `function` 自定义解析处理
        
        Returns:
            dict : 解析字典
        &#39;&#39;&#39;
        res = self.task()
        if not res:
            return {}
        if res.apparent_encoding == None:
            res.encoding = &#39;utf-8&#39;
            html = etree.HTML(res.content.decode(&#39;utf-8&#39;))
        else:
            res.encoding = res.apparent_encoding
            html = etree.HTML(res.content.decode(res.encoding, &#39;ignore&#39;))
        res = {}
        for i, j in analytic.items():
            res[i] = [auxiliary(r) for r in html.xpath(j)]
        return res

    # json 解析
    def json_analysis(self, analytic : dict, auxiliary = original) -&gt; dict:
        &#39;&#39;&#39;实例 json 解析方法.

        Args:
            `analytic` : `dict[str:str]` xpath解析字典
            `auxiliary` : `function` 自定义解析处理
        
        Returns:
            dict : 解析字典
        &#39;&#39;&#39;
        res = self.task()
        if not res:
            return {}
        if res.apparent_encoding == None:
            res.encoding = &#39;utf-8&#39;
        else:
            res.encoding = res.apparent_encoding
        reDict = {}
        for i,j in analytic.items():
            reDict[i] = auxiliary(XDict(res.json(),j).edict())
        return reDict

    # 正则 解析
    def re_analysis(self, analytic, auxiliary = original):
        &#39;&#39;&#39;实例 正则 解析方法.

        Args:
            `analytic` : `dict`{`str`:`function`} 正则解析字典 
            `auxiliary` : `function` 自定义解析处理
        
        Returns:
            dict : 解析字典
        &#39;&#39;&#39;
        res = self.task()
        if not res:
            return {}
        if res.apparent_encoding == None:
            res.encoding = &#39;utf-8&#39;
            html = etree.HTML(res.content.decode(&#39;utf-8&#39;))
        else:
            res.encoding = res.apparent_encoding
            html = etree.HTML(res.content.decode(res.encoding, &#39;ignore&#39;))
        res = {}
        for i, j in analytic.items():
            res[i]=[auxiliary(r) for r in j(html)]
        return res

    # 保存文件路径
    def save_file(self) -&gt; str:
        &#39;&#39;&#39;保存文件方法，如果 `filename` 不为绝对路径,则保存文件的路径为当前目录&#39;&#39;&#39;

        res = self.task()
        if not res:
            return &#39;&#39;
        if os.path.isabs(self.filename):
            path = os.path.split(self.filename)[0]
        else:
            path = os.path.join(self.onFile,os.path.split(self.filename)[0])
        if not os.path.exists(path):
            os.makedirs(path)
        path = os.path.join(path,os.path.split(self.filename)[1]+f&#39;.{self.format}&#39;)
        with open(path,mode=&#39;wb&#39;) as f:
            f.write(res.content)
        return path

    def __repr__(self) -&gt; dict:
        &#39;&#39;&#39; `__repr__` 为 `lupro` 实例化参数&#39;&#39;&#39;
        return {&#39;filename&#39;:self.filename ,&#39;format&#39;:self.format , &#39;proxie&#39;:self.proxie, &#39;faultolt&#39;:self.faultolt, &#39;content&#39; : self.content ,&#39;lupros&#39;:self.lupros}


# 实例化参数字典
def requests_dict(luprodir,url,no) -&gt; dict:
    &#39;&#39;&#39;实例化参数字典.

    Args:
        `luprodir` : `dict` lupro构造参数
        `url` : `str` 链接
        `no` : `str` filename 序列
    
    Returns:
        dict : lupro参数字典
    &#39;&#39;&#39;
    luprodict = copy(luprodir)
    if luprodict[&#39;lupros&#39;][1]:
        luprodict[&#39;lupros&#39;] = (luprodict[&#39;lupros&#39;][0], (url,*luprodict[&#39;lupros&#39;][1][1:]),luprodict[&#39;lupros&#39;][2])
    else:
        luprodict[&#39;lupros&#39;][2][&#39;url&#39;] = url
    luprodict[&#39;filename&#39;] += str(no)
    return luprodict

# 实例化生成器
def generator(instantiation : lupro, url : list, filenameNo = []) -&gt; list:
    &#39;&#39;&#39;实例化生成器

    Args:
        `instantiation` : `lupro` lupro模板实例
        `url` : `list` 链接表
        `filenameNo` : `list` filename 序列

    Returns:
        list : lupro实例列表
    &#39;&#39;&#39;
    if not filenameNo:
        filenameNo = range(len(url))
    repr = instantiation.__repr__()
    res = []
    for i,j in enumerate(url):
        res.append(lupro(**requests_dict(repr,j,filenameNo[i])))
    return res

# 批量请求
def Batchsubmission(generator) -&gt; list:
    &#39;&#39;&#39;通过实例列表的批量请求
    
    Args：

        `generator` : `list[lupro]` lupro实例列表
    
    Returns:
        list : Response列表
    &#39;&#39;&#39;
    a = [gevent.spawn(i.task,) for i in generator]
    gevent.joinall(a)
    return ([i.value for i in a])

# 批量下载
def BulkDownload(generator) -&gt; list:
    &#39;&#39;&#39;通过实例列表的批量下载
    
    Args：

        `generator` : `list[lupro]` lupro实例列表
    
    Returns:
        list : path 列表
    &#39;&#39;&#39;
    a = [gevent.spawn(i.save_file,) for i in generator]
    gevent.joinall(a)
    return ([i.value for i in a])

# xpath 批量解析
def xpath_Batchanalysis(generator, analytic, auxiliary = original) -&gt; list:
    &#39;&#39;&#39; xpath批量解析器

    Args:
        `generator` : `list[lupro]` lupro实例列表
        `analytic` : `dict` 解析字典
        `auxiliary` : `function` 自定义解析处理
        
    Returns:
        list[dict] : 解析列表
    &#39;&#39;&#39;
    a = [gevent.spawn(i.xpath_analysis, analytic, auxiliary) for i in generator]
    gevent.joinall(a)
    return ([i.value for i in a])

# json 批量解析
def json_Batchanalysis(generator, analytic, auxiliary = original) -&gt; list:
    &#39;&#39;&#39;json批量解析器 &lt;json解析器为 `dtanys`&gt;

    Args:
        `generator` : `list[lupro]` lupro实例列表
        `analytic` : `dict` 解析字典
        `auxiliary` : `function` 自定义解析处理
    
    Returns:
        list[dict] : 解析列表
    &#39;&#39;&#39;
    a = [gevent.spawn(i.json_analysis, analytic, auxiliary) for i in generator]
    gevent.joinall(a)
    return ([i.value for i in a])

# 正则 批量解析
def re_Batchanalysis(generator, analytic, auxiliary = original) -&gt; list:
    &#39;&#39;&#39;正则解析器

    Args:
        `generator` : `list[lupro]` lupro实例列表
        `analytic` : `dict`{`str`:`function`} 正则解析字典 
        `auxiliary` : `function` 自定义解析处理
    
    Returns:
        list[dict] : 解析列表
    &#39;&#39;&#39;
    a = [gevent.spawn(i.re_analysis, analytic, auxiliary) for i in generator]
    gevent.joinall(a)
    return ([i.value for i in a])

# 批量解析
def Batchanalysis(mold : str ,generator : list, analytic : dict, auxiliary = original) -&gt; list:
    &#39;&#39;&#39;lupro批量解析

    Args:
        `mold` : `str` 解析方法
        `generator` : `list[lupro]` lupro实例列表
        `analytic` : `dict` 解析字典
        `auxiliary` : `function` 自定义解析处理

    Returns:
        list[dict] : 解析列表
    &#39;&#39;&#39;
    if mold == &#39;xpath&#39;:
        return xpath_Batchanalysis(generator, analytic, auxiliary)
    elif mold == &#39;json&#39;:
        return json_Batchanalysis(generator, analytic, auxiliary)
    elif mold == &#39;re&#39;:
        return re_Batchanalysis(generator, analytic, auxiliary)
    else:
        raise TypeError(&#39;No corresponding parsing method!&#39;)

# 批量异步请求
def async_lupro(generator):
    &#39;&#39;&#39;原生异步`requests`请求

    Args:
        `generator` : `list[lupros]` lupros实例列表
    
    Returns:
        list[Response] : Response列表
    &#39;&#39;&#39;

    a = [gevent.spawn(requests.request,i[0],*i[1],**i[2]) for i in generator]
    gevent.joinall(a)
    return ([i.value for i in a])

# Update log
&#39;&#39;&#39;
v1.0.4
* 完全兼容 `requests` 一切操作，只需 `from lupro import lupro as requests` 即可不更改一行代码
* 新增原生异步 `requests`请求 只需 `async_lupro([lupros.get(&#39;https://www.python.org&#39;)]*10)`
* 标准化函数描述

v1.0.5
* 修复了 `lupro.lupro` 解析方法判断的失误
* 修复了 移除无效代理的方式
&#39;&#39;&#39;</code></pre>
</details>
</section>
<section>
</section>
<section>
</section>
<section>
<h2 class="section-title" id="header-functions">Functions</h2>
<dl>
<dt id="lupro.Batchanalysis"><code class="name flex">
<span>def <span class="ident">Batchanalysis</span></span>(<span>mold: str, generator: list, analytic: dict, auxiliary=&lt;function original&gt;) ‑> list</span>
</code></dt>
<dd>
<div class="desc"><p>lupro批量解析</p>
<h2 id="args">Args</h2>
<p><code>mold</code> : <code>str</code> 解析方法
<code><a title="lupro.generator" href="#lupro.generator">generator()</a></code> : <code>list[<a title="lupro.lupro" href="#lupro.lupro">lupro</a>]</code> lupro实例列表
<code>analytic</code> : <code>dict</code> 解析字典
<code>auxiliary</code> : <code>function</code> 自定义解析处理</p>
<h2 id="returns">Returns</h2>
<dl>
<dt><code>list[dict] </code></dt>
<dd>解析列表</dd>
</dl></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def Batchanalysis(mold : str ,generator : list, analytic : dict, auxiliary = original) -&gt; list:
    &#39;&#39;&#39;lupro批量解析

    Args:
        `mold` : `str` 解析方法
        `generator` : `list[lupro]` lupro实例列表
        `analytic` : `dict` 解析字典
        `auxiliary` : `function` 自定义解析处理

    Returns:
        list[dict] : 解析列表
    &#39;&#39;&#39;
    if mold == &#39;xpath&#39;:
        return xpath_Batchanalysis(generator, analytic, auxiliary)
    elif mold == &#39;json&#39;:
        return json_Batchanalysis(generator, analytic, auxiliary)
    elif mold == &#39;re&#39;:
        return re_Batchanalysis(generator, analytic, auxiliary)
    else:
        raise TypeError(&#39;No corresponding parsing method!&#39;)</code></pre>
</details>
</dd>
<dt id="lupro.Batchsubmission"><code class="name flex">
<span>def <span class="ident">Batchsubmission</span></span>(<span>generator) ‑> list</span>
</code></dt>
<dd>
<div class="desc"><p>通过实例列表的批量请求</p>
<p>Args：</p>
<pre><code>&lt;code&gt;&lt;a title="lupro.generator" href="#lupro.generator"&gt;generator()&lt;/a&gt;&lt;/code&gt; : &lt;code&gt;list\[&lt;a title="lupro.lupro" href="#lupro.lupro"&gt;lupro&lt;/a&gt;]&lt;/code&gt; lupro实例列表
</code></pre>
<h2 id="returns">Returns</h2>
<dl>
<dt><code>list </code></dt>
<dd>Response列表</dd>
</dl></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def Batchsubmission(generator) -&gt; list:
    &#39;&#39;&#39;通过实例列表的批量请求
    
    Args：

        `generator` : `list[lupro]` lupro实例列表
    
    Returns:
        list : Response列表
    &#39;&#39;&#39;
    a = [gevent.spawn(i.task,) for i in generator]
    gevent.joinall(a)
    return ([i.value for i in a])</code></pre>
</details>
</dd>
<dt id="lupro.BulkDownload"><code class="name flex">
<span>def <span class="ident">BulkDownload</span></span>(<span>generator) ‑> list</span>
</code></dt>
<dd>
<div class="desc"><p>通过实例列表的批量下载</p>
<p>Args：</p>
<pre><code>&lt;code&gt;&lt;a title="lupro.generator" href="#lupro.generator"&gt;generator()&lt;/a&gt;&lt;/code&gt; : &lt;code&gt;list\[&lt;a title="lupro.lupro" href="#lupro.lupro"&gt;lupro&lt;/a&gt;]&lt;/code&gt; lupro实例列表
</code></pre>
<h2 id="returns">Returns</h2>
<dl>
<dt><code>list </code></dt>
<dd>path 列表</dd>
</dl></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def BulkDownload(generator) -&gt; list:
    &#39;&#39;&#39;通过实例列表的批量下载
    
    Args：

        `generator` : `list[lupro]` lupro实例列表
    
    Returns:
        list : path 列表
    &#39;&#39;&#39;
    a = [gevent.spawn(i.save_file,) for i in generator]
    gevent.joinall(a)
    return ([i.value for i in a])</code></pre>
</details>
</dd>
<dt id="lupro.async_lupro"><code class="name flex">
<span>def <span class="ident">async_lupro</span></span>(<span>generator)</span>
</code></dt>
<dd>
<div class="desc"><p>原生异步<code>requests</code>请求</p>
<h2 id="args">Args</h2>
<p><code><a title="lupro.generator" href="#lupro.generator">generator()</a></code> : <code>list[<a title="lupro.lupros" href="#lupro.lupros">lupros</a>]</code> lupros实例列表</p>
<h2 id="returns">Returns</h2>
<dl>
<dt><code>list[Response] </code></dt>
<dd>Response列表</dd>
</dl></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def async_lupro(generator):
    &#39;&#39;&#39;原生异步`requests`请求

    Args:
        `generator` : `list[lupros]` lupros实例列表
    
    Returns:
        list[Response] : Response列表
    &#39;&#39;&#39;

    a = [gevent.spawn(requests.request,i[0],*i[1],**i[2]) for i in generator]
    gevent.joinall(a)
    return ([i.value for i in a])</code></pre>
</details>
</dd>
<dt id="lupro.generator"><code class="name flex">
<span>def <span class="ident">generator</span></span>(<span>instantiation: <a title="lupro.lupro" href="#lupro.lupro">lupro</a>, url: list, filenameNo=[]) ‑> list</span>
</code></dt>
<dd>
<div class="desc"><p>实例化生成器</p>
<h2 id="args">Args</h2>
<p><code>instantiation</code> : <code><a title="lupro.lupro" href="#lupro.lupro">lupro</a></code> lupro模板实例
<code>url</code> : <code>list</code> 链接表
<code>filenameNo</code> : <code>list</code> filename 序列</p>
<h2 id="returns">Returns</h2>
<dl>
<dt><code>list </code></dt>
<dd>lupro实例列表</dd>
</dl></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def generator(instantiation : lupro, url : list, filenameNo = []) -&gt; list:
    &#39;&#39;&#39;实例化生成器

    Args:
        `instantiation` : `lupro` lupro模板实例
        `url` : `list` 链接表
        `filenameNo` : `list` filename 序列

    Returns:
        list : lupro实例列表
    &#39;&#39;&#39;
    if not filenameNo:
        filenameNo = range(len(url))
    repr = instantiation.__repr__()
    res = []
    for i,j in enumerate(url):
        res.append(lupro(**requests_dict(repr,j,filenameNo[i])))
    return res</code></pre>
</details>
</dd>
<dt id="lupro.get_header"><code class="name flex">
<span>def <span class="ident">get_header</span></span>(<span>) ‑> str</span>
</code></dt>
<dd>
<div class="desc"><p><code><a title="lupro.get_header" href="#lupro.get_header">get_header()</a></code> 生成一个UA头.</p>
<h2 id="args">Args</h2>
<p>None : 无参数</p>
<h2 id="returns">Returns</h2>
<dl>
<dt><code>str </code></dt>
<dd>返回一个UA头字符串即可</dd>
</dl></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def get_header() -&gt; str:
    &#39;&#39;&#39;`get_header` 生成一个UA头.

    Args:
        None : 无参数

    Returns:
        str : 返回一个UA头字符串即可
    &#39;&#39;&#39;
    return random.choice(ua_list)</code></pre>
</details>
</dd>
<dt id="lupro.get_proxies"><code class="name flex">
<span>def <span class="ident">get_proxies</span></span>(<span>)</span>
</code></dt>
<dd>
<div class="desc"><p>获取代理,并将代理赋值到 <code><a title="lupro.lupro.Proxies" href="#lupro.lupro.Proxies">lupro.Proxies</a></code>.</p>
<h2 id="args">Args</h2>
<p>None : 无参数</p>
<h2 id="returns">Returns</h2>
<dl>
<dt><code>bool </code></dt>
<dd>返回Ture</dd>
</dl></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def get_proxies():
    &#39;&#39;&#39;获取代理,并将代理赋值到 `lupro.Proxies`.

    Args:
        None : 无参数

    Returns:
        bool : 返回Ture
    &#39;&#39;&#39;
    raise NameError(&#39;Please rewrite `get_proxies` function.&#39;)</code></pre>
</details>
</dd>
<dt id="lupro.json_Batchanalysis"><code class="name flex">
<span>def <span class="ident">json_Batchanalysis</span></span>(<span>generator, analytic, auxiliary=&lt;function original&gt;) ‑> list</span>
</code></dt>
<dd>
<div class="desc"><p>json批量解析器 <json解析器为 \<code>dtanys\</code>></p>
<h2 id="args">Args</h2>
<p><code><a title="lupro.generator" href="#lupro.generator">generator()</a></code> : <code>list[<a title="lupro.lupro" href="#lupro.lupro">lupro</a>]</code> lupro实例列表
<code>analytic</code> : <code>dict</code> 解析字典
<code>auxiliary</code> : <code>function</code> 自定义解析处理</p>
<h2 id="returns">Returns</h2>
<dl>
<dt><code>list[dict] </code></dt>
<dd>解析列表</dd>
</dl></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def json_Batchanalysis(generator, analytic, auxiliary = original) -&gt; list:
    &#39;&#39;&#39;json批量解析器 &lt;json解析器为 `dtanys`&gt;

    Args:
        `generator` : `list[lupro]` lupro实例列表
        `analytic` : `dict` 解析字典
        `auxiliary` : `function` 自定义解析处理
    
    Returns:
        list[dict] : 解析列表
    &#39;&#39;&#39;
    a = [gevent.spawn(i.json_analysis, analytic, auxiliary) for i in generator]
    gevent.joinall(a)
    return ([i.value for i in a])</code></pre>
</details>
</dd>
<dt id="lupro.logging"><code class="name flex">
<span>def <span class="ident">logging</span></span>(<span>text) ‑> str</span>
</code></dt>
<dd>
<div class="desc"><p>自定义日志打印
<code><a title="lupro.logging" href="#lupro.logging">logging()</a></code> 可以重写,返回带 <code>text</code> 的字符串即可.</p>
<h2 id="args">Args</h2>
<p><code>text</code> : str 日志</p>
<h2 id="returns">Returns</h2>
<dl>
<dt><code>str </code></dt>
<dd>返回处理后的打印日志</dd>
</dl></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def logging(text) -&gt; str:
    &#39;&#39;&#39;自定义日志打印  `logging` 可以重写,返回带 `text` 的字符串即可.

    Args:
        `text` : str 日志
    
    Returns:
        str : 返回处理后的打印日志
    &#39;&#39;&#39;
    return &#34;%s INFO %s&#34;  % (datetime.now(), text)</code></pre>
</details>
</dd>
<dt id="lupro.original"><code class="name flex">
<span>def <span class="ident">original</span></span>(<span>f) ‑> Any</span>
</code></dt>
<dd>
<div class="desc"><p>默认解析处理函数.</p>
<h2 id="args">Args</h2>
<p><code>f</code> : function 自定义解析处理函数</p>
<h2 id="retuens">Retuens</h2>
<p>function : 自定义解析处理函数</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def original(f) -&gt; Any:
    &#39;&#39;&#39;  默认解析处理函数.

    Args:
        `f` : function 自定义解析处理函数
    
    Retuens:
        function : 自定义解析处理函数
    &#39;&#39;&#39;
    return f</code></pre>
</details>
</dd>
<dt id="lupro.re_Batchanalysis"><code class="name flex">
<span>def <span class="ident">re_Batchanalysis</span></span>(<span>generator, analytic, auxiliary=&lt;function original&gt;) ‑> list</span>
</code></dt>
<dd>
<div class="desc"><p>正则解析器</p>
<h2 id="args">Args</h2>
<p><code><a title="lupro.generator" href="#lupro.generator">generator()</a></code> : <code>list[<a title="lupro.lupro" href="#lupro.lupro">lupro</a>]</code> lupro实例列表
<code>analytic</code> : <code>dict</code>{<code>str</code>:<code>function</code>} 正则解析字典
<code>auxiliary</code> : <code>function</code> 自定义解析处理</p>
<h2 id="returns">Returns</h2>
<dl>
<dt><code>list[dict] </code></dt>
<dd>解析列表</dd>
</dl></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def re_Batchanalysis(generator, analytic, auxiliary = original) -&gt; list:
    &#39;&#39;&#39;正则解析器

    Args:
        `generator` : `list[lupro]` lupro实例列表
        `analytic` : `dict`{`str`:`function`} 正则解析字典 
        `auxiliary` : `function` 自定义解析处理
    
    Returns:
        list[dict] : 解析列表
    &#39;&#39;&#39;
    a = [gevent.spawn(i.re_analysis, analytic, auxiliary) for i in generator]
    gevent.joinall(a)
    return ([i.value for i in a])</code></pre>
</details>
</dd>
<dt id="lupro.requests_dict"><code class="name flex">
<span>def <span class="ident">requests_dict</span></span>(<span>luprodir, url, no) ‑> dict</span>
</code></dt>
<dd>
<div class="desc"><p>实例化参数字典.</p>
<h2 id="args">Args</h2>
<p><code>luprodir</code> : <code>dict</code> lupro构造参数
<code>url</code> : <code>str</code> 链接
<code>no</code> : <code>str</code> filename 序列</p>
<h2 id="returns">Returns</h2>
<dl>
<dt><code>dict </code></dt>
<dd>lupro参数字典</dd>
</dl></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def requests_dict(luprodir,url,no) -&gt; dict:
    &#39;&#39;&#39;实例化参数字典.

    Args:
        `luprodir` : `dict` lupro构造参数
        `url` : `str` 链接
        `no` : `str` filename 序列
    
    Returns:
        dict : lupro参数字典
    &#39;&#39;&#39;
    luprodict = copy(luprodir)
    if luprodict[&#39;lupros&#39;][1]:
        luprodict[&#39;lupros&#39;] = (luprodict[&#39;lupros&#39;][0], (url,*luprodict[&#39;lupros&#39;][1][1:]),luprodict[&#39;lupros&#39;][2])
    else:
        luprodict[&#39;lupros&#39;][2][&#39;url&#39;] = url
    luprodict[&#39;filename&#39;] += str(no)
    return luprodict</code></pre>
</details>
</dd>
<dt id="lupro.verify_proxies"><code class="name flex">
<span>def <span class="ident">verify_proxies</span></span>(<span>proxies: str) ‑> str</span>
</code></dt>
<dd>
<div class="desc"><p>自定义代理验证 <code><a title="lupro.verify_proxies" href="#lupro.verify_proxies">verify_proxies()</a></code> 可以重写,如果可用返回 <code>proxies</code> 否则返回 <code>False</code>.</p>
<h2 id="args">Args</h2>
<p><code>proxies</code> : str 代理</p>
<h2 id="returns">Returns</h2>
<p>str | bool : 如果可用返回 <code>proxies</code> 否则返回 <code>False</code></p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def verify_proxies(proxies : str) -&gt; str:
    &#39;&#39;&#39; 自定义代理验证 `verify_proxies` 可以重写,如果可用返回 `proxies` 否则返回 `False`.

    Args:
        `proxies` : str 代理
    
    Returns:
        str | bool : 如果可用返回 `proxies` 否则返回 `False`
    &#39;&#39;&#39;
    try:
        requests.get(url=&#39;http://www.baidu.com/&#39;, headers={&#34;User-Agent&#34;: get_header()},proxies={&#39;http&#39;: f&#34;//{proxies}&#34;},timeout=10)
    except:
        return False
    return proxies</code></pre>
</details>
</dd>
<dt id="lupro.xpath_Batchanalysis"><code class="name flex">
<span>def <span class="ident">xpath_Batchanalysis</span></span>(<span>generator, analytic, auxiliary=&lt;function original&gt;) ‑> list</span>
</code></dt>
<dd>
<div class="desc"><p>xpath批量解析器</p>
<h2 id="args">Args</h2>
<p><code><a title="lupro.generator" href="#lupro.generator">generator()</a></code> : <code>list[<a title="lupro.lupro" href="#lupro.lupro">lupro</a>]</code> lupro实例列表
<code>analytic</code> : <code>dict</code> 解析字典
<code>auxiliary</code> : <code>function</code> 自定义解析处理</p>
<h2 id="returns">Returns</h2>
<dl>
<dt><code>list[dict] </code></dt>
<dd>解析列表</dd>
</dl></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def xpath_Batchanalysis(generator, analytic, auxiliary = original) -&gt; list:
    &#39;&#39;&#39; xpath批量解析器

    Args:
        `generator` : `list[lupro]` lupro实例列表
        `analytic` : `dict` 解析字典
        `auxiliary` : `function` 自定义解析处理
        
    Returns:
        list[dict] : 解析列表
    &#39;&#39;&#39;
    a = [gevent.spawn(i.xpath_analysis, analytic, auxiliary) for i in generator]
    gevent.joinall(a)
    return ([i.value for i in a])</code></pre>
</details>
</dd>
</dl>
</section>
<section>
<h2 class="section-title" id="header-classes">Classes</h2>
<dl>
<dt id="lupro.inherit"><code class="flex name class">
<span>class <span class="ident">inherit</span></span>
<span>(</span><span>*args, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"><p>类泛属性</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">class inherit(type):
    &#39;&#39;&#39;类泛属性&#39;&#39;&#39;

    def __getattr__(cls, name):
        if not &#39;__general__&#39; in dir(cls):
            raise NameError(&#34;name &#39;__general__&#39; is not defined&#34;)
        if hasattr(cls.__general__, name):
            return getattr(cls.__general__, name)
        return getattr(object.__getattr__, name)</code></pre>
</details>
<h3>Ancestors</h3>
<ul class="hlist">
<li>builtins.type</li>
</ul>
</dd>
<dt id="lupro.lupro"><code class="flex name class">
<span>class <span class="ident">lupro</span></span>
<span>(</span><span>filename: str, lupros: <a title="lupro.lupros" href="#lupro.lupros">lupros</a>, proxie: bool = False, format: str = 'html', content: int = 200, faultolt: int = 10)</span>
</code></dt>
<dd>
<div class="desc"><p><code><a title="lupro.lupro" href="#lupro.lupro">lupro</a></code> 引擎基类</p>
<p>初始化 <code><a title="lupro.lupro" href="#lupro.lupro">lupro</a></code> 实例，一个实例代表一个请求或任务.</p>
<h2 id="args">Args</h2>
<p><code>filename</code> : <code>str</code> 文件路径或请求名称 推荐使用路径命名
<code><a title="lupro.lupros" href="#lupro.lupros">lupros</a></code> : <code><a title="lupro.lupros" href="#lupro.lupros">lupros</a></code> requests参数字典
<code>proxie</code> : <code>bool</code> 是否使用代理
<code>format</code> : <code>str</code> 保存文件格式
<code>content</code> : <code>str</code> 回调最少字节
<code>faultolt</code> : <code>str</code> 可重试次数</p>
<h2 id="returns">Returns</h2>
<p>None</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">class lupro(metaclass=inherit):
    &#39;&#39;&#39;`lupro` 引擎基类&#39;&#39;&#39;

    # 兼容 `requests`
    __general__ = requests

    # 当前文件夹
    onFile = os.path.split(sys.argv[0])[0]

    # 代理池
    Proxies = []

    # 是否验证代理池
    VERIFY_PROXIES = False

    # 是否已验证代理
    IS_AGENT_VERIFIED = False

    def __init__(self, filename : str, lupros : lupros, proxie : bool = False, format : str = &#39;html&#39;, content : int = 200,faultolt : int = 10):
        &#39;&#39;&#39; 初始化 `lupro` 实例，一个实例代表一个请求或任务.

        Args:
            `filename` : `str` 文件路径或请求名称 推荐使用路径命名
            `lupros` : `lupros` requests参数字典
            `proxie` : `bool` 是否使用代理
            `format` : `str` 保存文件格式
            `content` : `str` 回调最少字节
            `faultolt` : `str` 可重试次数
        
        Returns:
            None
        &#39;&#39;&#39;
        self.filename = filename    # 文件路径或请求名称 推荐使用路径命名
        self.format = format        # 保存文件格式
        self.faultolt = faultolt    # 可重试次数
        self.proxie = proxie        # 是否使用代理
        self.content = content      # 回调最少字节
        self.lupros = lupros
        self.args = (lupros[0],*lupros[1])
        self.kw = copy(lupros[2])

        if (not lupro.Proxies) and proxie:
            get_proxies()

        assert (not self.proxie) or (self.proxie and lupro.Proxies),&#39;`Proxies` cannot be empty!&#39;

        if not &#39;headers&#39; in self.kw:
            self.kw[&#39;headers&#39;] = {&#39;User-Agent&#39; : get_header()}
        
        if lupro.VERIFY_PROXIES and self.proxie and (not lupro.IS_AGENT_VERIFIED):
            print(logging(&#39;开始验证代理！&#39;))
            t1 = datetime.now()
            self.authentication()
            lupro.IS_AGENT_VERIFIED = True
            print(logging(f&#39;用时{datetime.now()-t1}&#39;))
            print(logging(f&#34;高质量代理：{len(lupro.Proxies)}个！&#34;))
        if (not &#39;proxies&#39; in self.kw) and self.proxie:
            self.proxie = random.choice(lupro.Proxies)
            self.kw[&#39;proxies&#39;] = {&#39;http&#39;: f&#34;//{self.proxie}&#34;}
    
    # 验证代理
    def authentication(self) -&gt; None:
        &#39;&#39;&#39;`authentication` 为快速代理验证.&#39;&#39;&#39;

        auth_proxies = [gevent.spawn(verify_proxies,i) for i in lupro.Proxies]
        gevent.joinall(auth_proxies)
        lupro.Proxies = [i.value for i in auth_proxies if i.value]

    # 请求方法 lupro 所有请求
    def task(self) -&gt; requests:
        &#39;&#39;&#39;`task` 为 `lupro` 实例所有请求接口&#39;&#39;&#39;

        if self.faultolt&lt;=0:
            print(f&#39;{self.filename} failed.&#39;)
            return False
        print(logging(f&#34;{self.filename} {self.proxie} -----&gt;开始请求！&#34;))
        try:
            res = requests.request(*self.args, **self.kw)
        except:
            if self.proxie in lupro.Proxies:
                lupro.Proxies.remove(self.proxie)
            self.faultolt-=1
            self.proxie = random.choice(lupro.Proxies)
            self.kw[&#39;proxies&#39;] = {&#39;http&#39;: f&#34;//{self.proxie}&#34;}
            print(logging(f&#34;{self.filename}-----&gt;更新字典中！&#34;))
            return self.task()
        if not res.status_code==200:
            return self.task()
        if len(res.content)&lt;self.content:
            return self.task()
        print(logging(f&#34;{self.filename} {len(res.content)} -----&gt;请求结束！&#34;))
        return res
    
    # xpath 解析
    def xpath_analysis(self, analytic : dict, auxiliary = original) -&gt; dict:
        &#39;&#39;&#39;实例 xpath 解析方法.

        Args:
            `analytic` : `dict[str:str]` xpath解析字典
            `auxiliary` : `function` 自定义解析处理
        
        Returns:
            dict : 解析字典
        &#39;&#39;&#39;
        res = self.task()
        if not res:
            return {}
        if res.apparent_encoding == None:
            res.encoding = &#39;utf-8&#39;
            html = etree.HTML(res.content.decode(&#39;utf-8&#39;))
        else:
            res.encoding = res.apparent_encoding
            html = etree.HTML(res.content.decode(res.encoding, &#39;ignore&#39;))
        res = {}
        for i, j in analytic.items():
            res[i] = [auxiliary(r) for r in html.xpath(j)]
        return res

    # json 解析
    def json_analysis(self, analytic : dict, auxiliary = original) -&gt; dict:
        &#39;&#39;&#39;实例 json 解析方法.

        Args:
            `analytic` : `dict[str:str]` xpath解析字典
            `auxiliary` : `function` 自定义解析处理
        
        Returns:
            dict : 解析字典
        &#39;&#39;&#39;
        res = self.task()
        if not res:
            return {}
        if res.apparent_encoding == None:
            res.encoding = &#39;utf-8&#39;
        else:
            res.encoding = res.apparent_encoding
        reDict = {}
        for i,j in analytic.items():
            reDict[i] = auxiliary(XDict(res.json(),j).edict())
        return reDict

    # 正则 解析
    def re_analysis(self, analytic, auxiliary = original):
        &#39;&#39;&#39;实例 正则 解析方法.

        Args:
            `analytic` : `dict`{`str`:`function`} 正则解析字典 
            `auxiliary` : `function` 自定义解析处理
        
        Returns:
            dict : 解析字典
        &#39;&#39;&#39;
        res = self.task()
        if not res:
            return {}
        if res.apparent_encoding == None:
            res.encoding = &#39;utf-8&#39;
            html = etree.HTML(res.content.decode(&#39;utf-8&#39;))
        else:
            res.encoding = res.apparent_encoding
            html = etree.HTML(res.content.decode(res.encoding, &#39;ignore&#39;))
        res = {}
        for i, j in analytic.items():
            res[i]=[auxiliary(r) for r in j(html)]
        return res

    # 保存文件路径
    def save_file(self) -&gt; str:
        &#39;&#39;&#39;保存文件方法，如果 `filename` 不为绝对路径,则保存文件的路径为当前目录&#39;&#39;&#39;

        res = self.task()
        if not res:
            return &#39;&#39;
        if os.path.isabs(self.filename):
            path = os.path.split(self.filename)[0]
        else:
            path = os.path.join(self.onFile,os.path.split(self.filename)[0])
        if not os.path.exists(path):
            os.makedirs(path)
        path = os.path.join(path,os.path.split(self.filename)[1]+f&#39;.{self.format}&#39;)
        with open(path,mode=&#39;wb&#39;) as f:
            f.write(res.content)
        return path

    def __repr__(self) -&gt; dict:
        &#39;&#39;&#39; `__repr__` 为 `lupro` 实例化参数&#39;&#39;&#39;
        return {&#39;filename&#39;:self.filename ,&#39;format&#39;:self.format , &#39;proxie&#39;:self.proxie, &#39;faultolt&#39;:self.faultolt, &#39;content&#39; : self.content ,&#39;lupros&#39;:self.lupros}</code></pre>
</details>
<h3>Class variables</h3>
<dl>
<dt id="lupro.lupro.IS_AGENT_VERIFIED"><code class="name">var <span class="ident">IS_AGENT_VERIFIED</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="lupro.lupro.Proxies"><code class="name">var <span class="ident">Proxies</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="lupro.lupro.VERIFY_PROXIES"><code class="name">var <span class="ident">VERIFY_PROXIES</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="lupro.lupro.onFile"><code class="name">var <span class="ident">onFile</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
</dl>
<h3>Methods</h3>
<dl>
<dt id="lupro.lupro.authentication"><code class="name flex">
<span>def <span class="ident">authentication</span></span>(<span>self) ‑> NoneType</span>
</code></dt>
<dd>
<div class="desc"><p><code>authentication</code> 为快速代理验证.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def authentication(self) -&gt; None:
    &#39;&#39;&#39;`authentication` 为快速代理验证.&#39;&#39;&#39;

    auth_proxies = [gevent.spawn(verify_proxies,i) for i in lupro.Proxies]
    gevent.joinall(auth_proxies)
    lupro.Proxies = [i.value for i in auth_proxies if i.value]</code></pre>
</details>
</dd>
<dt id="lupro.lupro.json_analysis"><code class="name flex">
<span>def <span class="ident">json_analysis</span></span>(<span>self, analytic: dict, auxiliary=&lt;function original&gt;) ‑> dict</span>
</code></dt>
<dd>
<div class="desc"><p>实例 json 解析方法.</p>
<h2 id="args">Args</h2>
<p><code>analytic</code> : <code>dict[str:str]</code> xpath解析字典
<code>auxiliary</code> : <code>function</code> 自定义解析处理</p>
<h2 id="returns">Returns</h2>
<dl>
<dt><code>dict </code></dt>
<dd>解析字典</dd>
</dl></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def json_analysis(self, analytic : dict, auxiliary = original) -&gt; dict:
    &#39;&#39;&#39;实例 json 解析方法.

    Args:
        `analytic` : `dict[str:str]` xpath解析字典
        `auxiliary` : `function` 自定义解析处理
    
    Returns:
        dict : 解析字典
    &#39;&#39;&#39;
    res = self.task()
    if not res:
        return {}
    if res.apparent_encoding == None:
        res.encoding = &#39;utf-8&#39;
    else:
        res.encoding = res.apparent_encoding
    reDict = {}
    for i,j in analytic.items():
        reDict[i] = auxiliary(XDict(res.json(),j).edict())
    return reDict</code></pre>
</details>
</dd>
<dt id="lupro.lupro.re_analysis"><code class="name flex">
<span>def <span class="ident">re_analysis</span></span>(<span>self, analytic, auxiliary=&lt;function original&gt;)</span>
</code></dt>
<dd>
<div class="desc"><p>实例 正则 解析方法.</p>
<h2 id="args">Args</h2>
<p><code>analytic</code> : <code>dict</code>{<code>str</code>:<code>function</code>} 正则解析字典
<code>auxiliary</code> : <code>function</code> 自定义解析处理</p>
<h2 id="returns">Returns</h2>
<dl>
<dt><code>dict </code></dt>
<dd>解析字典</dd>
</dl></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def re_analysis(self, analytic, auxiliary = original):
    &#39;&#39;&#39;实例 正则 解析方法.

    Args:
        `analytic` : `dict`{`str`:`function`} 正则解析字典 
        `auxiliary` : `function` 自定义解析处理
    
    Returns:
        dict : 解析字典
    &#39;&#39;&#39;
    res = self.task()
    if not res:
        return {}
    if res.apparent_encoding == None:
        res.encoding = &#39;utf-8&#39;
        html = etree.HTML(res.content.decode(&#39;utf-8&#39;))
    else:
        res.encoding = res.apparent_encoding
        html = etree.HTML(res.content.decode(res.encoding, &#39;ignore&#39;))
    res = {}
    for i, j in analytic.items():
        res[i]=[auxiliary(r) for r in j(html)]
    return res</code></pre>
</details>
</dd>
<dt id="lupro.lupro.save_file"><code class="name flex">
<span>def <span class="ident">save_file</span></span>(<span>self) ‑> str</span>
</code></dt>
<dd>
<div class="desc"><p>保存文件方法，如果 <code>filename</code> 不为绝对路径,则保存文件的路径为当前目录</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def save_file(self) -&gt; str:
    &#39;&#39;&#39;保存文件方法，如果 `filename` 不为绝对路径,则保存文件的路径为当前目录&#39;&#39;&#39;

    res = self.task()
    if not res:
        return &#39;&#39;
    if os.path.isabs(self.filename):
        path = os.path.split(self.filename)[0]
    else:
        path = os.path.join(self.onFile,os.path.split(self.filename)[0])
    if not os.path.exists(path):
        os.makedirs(path)
    path = os.path.join(path,os.path.split(self.filename)[1]+f&#39;.{self.format}&#39;)
    with open(path,mode=&#39;wb&#39;) as f:
        f.write(res.content)
    return path</code></pre>
</details>
</dd>
<dt id="lupro.lupro.task"><code class="name flex">
<span>def <span class="ident">task</span></span>(<span>self) ‑> <module 'requests' from 'd:\\anaconda3\\lib\\site-packages\\requests\\__init__.py'></span>
</code></dt>
<dd>
<div class="desc"><p><code>task</code> 为 <code><a title="lupro.lupro" href="#lupro.lupro">lupro</a></code> 实例所有请求接口</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def task(self) -&gt; requests:
    &#39;&#39;&#39;`task` 为 `lupro` 实例所有请求接口&#39;&#39;&#39;

    if self.faultolt&lt;=0:
        print(f&#39;{self.filename} failed.&#39;)
        return False
    print(logging(f&#34;{self.filename} {self.proxie} -----&gt;开始请求！&#34;))
    try:
        res = requests.request(*self.args, **self.kw)
    except:
        if self.proxie in lupro.Proxies:
            lupro.Proxies.remove(self.proxie)
        self.faultolt-=1
        self.proxie = random.choice(lupro.Proxies)
        self.kw[&#39;proxies&#39;] = {&#39;http&#39;: f&#34;//{self.proxie}&#34;}
        print(logging(f&#34;{self.filename}-----&gt;更新字典中！&#34;))
        return self.task()
    if not res.status_code==200:
        return self.task()
    if len(res.content)&lt;self.content:
        return self.task()
    print(logging(f&#34;{self.filename} {len(res.content)} -----&gt;请求结束！&#34;))
    return res</code></pre>
</details>
</dd>
<dt id="lupro.lupro.xpath_analysis"><code class="name flex">
<span>def <span class="ident">xpath_analysis</span></span>(<span>self, analytic: dict, auxiliary=&lt;function original&gt;) ‑> dict</span>
</code></dt>
<dd>
<div class="desc"><p>实例 xpath 解析方法.</p>
<h2 id="args">Args</h2>
<p><code>analytic</code> : <code>dict[str:str]</code> xpath解析字典
<code>auxiliary</code> : <code>function</code> 自定义解析处理</p>
<h2 id="returns">Returns</h2>
<dl>
<dt><code>dict </code></dt>
<dd>解析字典</dd>
</dl></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def xpath_analysis(self, analytic : dict, auxiliary = original) -&gt; dict:
    &#39;&#39;&#39;实例 xpath 解析方法.

    Args:
        `analytic` : `dict[str:str]` xpath解析字典
        `auxiliary` : `function` 自定义解析处理
    
    Returns:
        dict : 解析字典
    &#39;&#39;&#39;
    res = self.task()
    if not res:
        return {}
    if res.apparent_encoding == None:
        res.encoding = &#39;utf-8&#39;
        html = etree.HTML(res.content.decode(&#39;utf-8&#39;))
    else:
        res.encoding = res.apparent_encoding
        html = etree.HTML(res.content.decode(res.encoding, &#39;ignore&#39;))
    res = {}
    for i, j in analytic.items():
        res[i] = [auxiliary(r) for r in html.xpath(j)]
    return res</code></pre>
</details>
</dd>
</dl>
</dd>
<dt id="lupro.lupros"><code class="flex name class">
<span>class <span class="ident">lupros</span></span>
</code></dt>
<dd>
<div class="desc"><p><code>requests</code> 辅助字典生成器</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">class lupros():
    &#39;&#39;&#39;`requests` 辅助字典生成器&#39;&#39;&#39;

    @classmethod
    def request(self, *args, **kw):
        return (args, kw)

    @classmethod
    def get(self, *args, **kw):
        return (&#39;get&#39;, args, kw)

    @classmethod
    def post(self, *args, **kw):
        return (&#39;post&#39;, args, kw)

    @classmethod
    def options(self, *args, **kw):
        return (&#39;options&#39;, args, kw)

    @classmethod
    def head(self, *args, **kw):
        self.args = (&#39;get&#39;, *args)
        self.kw = kw
        return (&#39;head&#39;, args, kw)

    @classmethod
    def put(self, *args, **kw):
        return (&#39;put&#39;, args, kw)

    @classmethod
    def patch(self, *args, **kw):
        return (&#39;patch&#39;, args, kw)

    @classmethod
    def delete(self, *args, **kw):
        return (&#39;delete&#39;, args, kw)</code></pre>
</details>
<h3>Static methods</h3>
<dl>
<dt id="lupro.lupros.delete"><code class="name flex">
<span>def <span class="ident">delete</span></span>(<span>*args, **kw)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">@classmethod
def delete(self, *args, **kw):
    return (&#39;delete&#39;, args, kw)</code></pre>
</details>
</dd>
<dt id="lupro.lupros.get"><code class="name flex">
<span>def <span class="ident">get</span></span>(<span>*args, **kw)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">@classmethod
def get(self, *args, **kw):
    return (&#39;get&#39;, args, kw)</code></pre>
</details>
</dd>
<dt id="lupro.lupros.head"><code class="name flex">
<span>def <span class="ident">head</span></span>(<span>*args, **kw)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">@classmethod
def head(self, *args, **kw):
    self.args = (&#39;get&#39;, *args)
    self.kw = kw
    return (&#39;head&#39;, args, kw)</code></pre>
</details>
</dd>
<dt id="lupro.lupros.options"><code class="name flex">
<span>def <span class="ident">options</span></span>(<span>*args, **kw)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">@classmethod
def options(self, *args, **kw):
    return (&#39;options&#39;, args, kw)</code></pre>
</details>
</dd>
<dt id="lupro.lupros.patch"><code class="name flex">
<span>def <span class="ident">patch</span></span>(<span>*args, **kw)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">@classmethod
def patch(self, *args, **kw):
    return (&#39;patch&#39;, args, kw)</code></pre>
</details>
</dd>
<dt id="lupro.lupros.post"><code class="name flex">
<span>def <span class="ident">post</span></span>(<span>*args, **kw)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">@classmethod
def post(self, *args, **kw):
    return (&#39;post&#39;, args, kw)</code></pre>
</details>
</dd>
<dt id="lupro.lupros.put"><code class="name flex">
<span>def <span class="ident">put</span></span>(<span>*args, **kw)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">@classmethod
def put(self, *args, **kw):
    return (&#39;put&#39;, args, kw)</code></pre>
</details>
</dd>
<dt id="lupro.lupros.request"><code class="name flex">
<span>def <span class="ident">request</span></span>(<span>*args, **kw)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">@classmethod
def request(self, *args, **kw):
    return (args, kw)</code></pre>
</details>
</dd>
</dl>
</dd>
</dl>
</section>
</article>
<nav id="sidebar">
<h1>Index</h1>
<div class="toc">
<ul></ul>
</div>
<ul id="index">
<li><h3><a href="#header-functions">Functions</a></h3>
<ul class="two-column">
<li><code><a title="lupro.Batchanalysis" href="#lupro.Batchanalysis">Batchanalysis</a></code></li>
<li><code><a title="lupro.Batchsubmission" href="#lupro.Batchsubmission">Batchsubmission</a></code></li>
<li><code><a title="lupro.BulkDownload" href="#lupro.BulkDownload">BulkDownload</a></code></li>
<li><code><a title="lupro.async_lupro" href="#lupro.async_lupro">async_lupro</a></code></li>
<li><code><a title="lupro.generator" href="#lupro.generator">generator</a></code></li>
<li><code><a title="lupro.get_header" href="#lupro.get_header">get_header</a></code></li>
<li><code><a title="lupro.get_proxies" href="#lupro.get_proxies">get_proxies</a></code></li>
<li><code><a title="lupro.json_Batchanalysis" href="#lupro.json_Batchanalysis">json_Batchanalysis</a></code></li>
<li><code><a title="lupro.logging" href="#lupro.logging">logging</a></code></li>
<li><code><a title="lupro.original" href="#lupro.original">original</a></code></li>
<li><code><a title="lupro.re_Batchanalysis" href="#lupro.re_Batchanalysis">re_Batchanalysis</a></code></li>
<li><code><a title="lupro.requests_dict" href="#lupro.requests_dict">requests_dict</a></code></li>
<li><code><a title="lupro.verify_proxies" href="#lupro.verify_proxies">verify_proxies</a></code></li>
<li><code><a title="lupro.xpath_Batchanalysis" href="#lupro.xpath_Batchanalysis">xpath_Batchanalysis</a></code></li>
</ul>
</li>
<li><h3><a href="#header-classes">Classes</a></h3>
<ul>
<li>
<h4><code><a title="lupro.inherit" href="#lupro.inherit">inherit</a></code></h4>
</li>
<li>
<h4><code><a title="lupro.lupro" href="#lupro.lupro">lupro</a></code></h4>
<ul class="two-column">
<li><code><a title="lupro.lupro.IS_AGENT_VERIFIED" href="#lupro.lupro.IS_AGENT_VERIFIED">IS_AGENT_VERIFIED</a></code></li>
<li><code><a title="lupro.lupro.Proxies" href="#lupro.lupro.Proxies">Proxies</a></code></li>
<li><code><a title="lupro.lupro.VERIFY_PROXIES" href="#lupro.lupro.VERIFY_PROXIES">VERIFY_PROXIES</a></code></li>
<li><code><a title="lupro.lupro.authentication" href="#lupro.lupro.authentication">authentication</a></code></li>
<li><code><a title="lupro.lupro.json_analysis" href="#lupro.lupro.json_analysis">json_analysis</a></code></li>
<li><code><a title="lupro.lupro.onFile" href="#lupro.lupro.onFile">onFile</a></code></li>
<li><code><a title="lupro.lupro.re_analysis" href="#lupro.lupro.re_analysis">re_analysis</a></code></li>
<li><code><a title="lupro.lupro.save_file" href="#lupro.lupro.save_file">save_file</a></code></li>
<li><code><a title="lupro.lupro.task" href="#lupro.lupro.task">task</a></code></li>
<li><code><a title="lupro.lupro.xpath_analysis" href="#lupro.lupro.xpath_analysis">xpath_analysis</a></code></li>
</ul>
</li>
<li>
<h4><code><a title="lupro.lupros" href="#lupro.lupros">lupros</a></code></h4>
<ul class="two-column">
<li><code><a title="lupro.lupros.delete" href="#lupro.lupros.delete">delete</a></code></li>
<li><code><a title="lupro.lupros.get" href="#lupro.lupros.get">get</a></code></li>
<li><code><a title="lupro.lupros.head" href="#lupro.lupros.head">head</a></code></li>
<li><code><a title="lupro.lupros.options" href="#lupro.lupros.options">options</a></code></li>
<li><code><a title="lupro.lupros.patch" href="#lupro.lupros.patch">patch</a></code></li>
<li><code><a title="lupro.lupros.post" href="#lupro.lupros.post">post</a></code></li>
<li><code><a title="lupro.lupros.put" href="#lupro.lupros.put">put</a></code></li>
<li><code><a title="lupro.lupros.request" href="#lupro.lupros.request">request</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc"><cite>pdoc</cite> 0.9.2</a>.</p>
</footer>
</body>
</html>